package com.example.service.impl;

import com.example.mapper.CourseMapper;
import com.example.pojo.Course;
import com.example.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Vector;

@Service
public class CourseServiceimpl implements CourseService {
    @Autowired
    private CourseMapper courseMapper;

    @Override
    public Vector<Course> select() {
           Vector<Course> courses=courseMapper.select();
           return courses;
    }

    @Override
    public Vector<Course> selectCourse(String name, String state,String teacher) {
         Vector<Course> courses=courseMapper.selectCourse(name,state,teacher);
         return courses;
    }

    @Override
    public void update(Course course) {
         courseMapper.update(course);
    }

    @Override
    public void delete(String id) {
        courseMapper.delete(id);
    }

    @Override
    public void add(Course course) {
        courseMapper.add(course);
    }

    @Override
    public Vector<Course> studentCourse(String id) {
        Vector<Course> courses=courseMapper.studentCourse(id);
        return courses;
    }
}
